﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace UserControls.Common
{
    /// <summary>
    /// ConfirmWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ConfirmWindow : Window
    {
        public ConfirmWindow(string title, string buttonText, string message)
        {
            InitializeComponent();
            Title = title??"系统提示";
            btnConfirm.Content = buttonText??"确认";
            txtMessage.Text = message;
            Owner = Application.Current.Windows[Application.Current.Windows.Count - 2];
        }
        private void ConfirmCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            this.Close();
        }
    }
}
